package com.springboot.controller;

import com.springboot.bean.BlogProperties;
import com.springboot.bean.ConfigBean;
import com.springboot.bean.TestConfigBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName IndexController
 * @Description TODO
 * @Author peter
 * @Date 19-4-11 下午5:52
 * @Version 1.0
 **/

@RestController
public class IndexController {

    @Autowired
    private BlogProperties blogProperties;

    @Autowired
    private ConfigBean configBean;

    @Autowired
    private TestConfigBean testConfigBean;

    @RequestMapping(value = "/index")
    String index() {
        //return blogProperties.getName() + "==" + blogProperties.getTitle();
        //return configBean.getName()+"——"+configBean.getTitle();
        return testConfigBean.getName() + "===" + testConfigBean.getAge();
    }
}
